// const env = require('./dev.env.js')
const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')

const path = require('path')
const webpack = require('webpack')

module.exports = merge(common, {
  mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
  devServer: {
    static: {
      directory: path.join(__dirname, '../dist'),
    },
    open: true, // 直接打开
    port: 3000,
    hot: true,
  },
  /*   plugins: [
    new webpack.DefinePlugin({
      'process.env': env,
    }),
  ], */
})
